import request from '@/utils/request'

// 查询预收订单列表
export function listOrder(query) {
  return request({
    url: `/ys-order/list/${query.pageNum}/${query.pageSize}`,
    method: 'get',
    params:query
  })
}

// 查询预收订单详细
export function getOrder(orderNumber) {
  return request({
    url: '/order-details/'+orderNumber,
    method: 'get'
  })
}

// 新增预收订单
export function addOrder(data) {
  return request({
    url: '/order/order',
    method: 'post',
    data: data
  })
}

// 修改预收订单
export function updateOrder(data) {
  return request({
    url: '/order/order',
    method: 'put',
    data: data
  })
}

// 删除预收订单
export function delOrder(orderId) {
  return request({
    url: '/order/order/' + orderId,
    method: 'delete'
  })
}

// 导出预收订单
export function exportOrder(query) {
  return request({
    url: '/order/order/export',
    method: 'get',
    params: query
  })
}
